package foodmaterial.entity;

import foodmaterial.action.valid.ObjectNullValid;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

public class CustomerTeam implements Serializable {
    private static final long serialVersionUID = -1899558279281203513L;
    private Long id ;
    @NotEmpty(message = "分组名称不能为空")
    private String name ;
    @ObjectNullValid(message = "餐别不能为空")
    private Long mealsTypeId ;
    private String mealsTypeName ;
    @Size(min= 1,message = "客户分组最少有一条明细")
    @Valid
    private List<CustomerTeamDetails> details;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getMealsTypeId() {
        return mealsTypeId;
    }

    public void setMealsTypeId(Long mealsTypeId) {
        this.mealsTypeId = mealsTypeId;
    }

    public String getMealsTypeName() {
        return mealsTypeName;
    }

    public void setMealsTypeName(String mealsTypeName) {
        this.mealsTypeName = mealsTypeName;
    }

    public List<CustomerTeamDetails> getDetails() {
        return details;
    }

    public void setDetails(List<CustomerTeamDetails> details) {
        this.details = details;
    }
}
